home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-03-20 | 5.2 KB | 163 lines | [TEXT/MPS ] |
- /*
- copyright © 1992-1994 Apple Computer Inc. All rights reserved.
-
- CommonDefines.h
- This file defines values used by more than one .r or .h file.
-
- Modification history
-
- 12/22/93 dmh Added custom dialog code.
- 12/20/93 dmh Sync'd with the shipping 1.0b3 GX driver.
- 7/23/92 TED New file today
-
- */
-
- // driver info
- #define DriverName "ImageWriter"
- #define DriverType 'pdvr'
- #define DriverCreator 'IWcd'
-
- // code segment info
- #define DriverSegType DriverType
- #define NewSegID 0
- #define OldSegID 1
-
- // resource IDs for panel resources
-
- #define r_FlipPanel 5000
- #define r_FlipPanelIcon 5000
- #define r_FlipPanel2 5050
- #define r_FlipPanelIcon2 5050
-
- // resource IDs for STR#s
- #define kFormatModeFontsID gxPrintingDriverBaseID // List of "native" mode fonts supported
- #define kFormatModeStylesID (gxPrintingDriverBaseID + 1) // List of "well" known styles that are supported
- #define kOldQualityID (gxPrintingDriverBaseID + 2)
- #define kNewQualityID (gxPrintingDriverBaseID + 3)
- #define kBoldStyle 1 // Index into kFormatModeStylesID 'STR#' of the bold style string
- #define kUnderlineStyle 2 // Index into kFormatModeStylesID 'STR#' of the underline style string
- #define kBestString 1
- #define kRoughString 2
-
-
- // Various resource defines.
-
- //------------- job dialog -------------
-
- #define d_QualPopUp 5 // DITL item of the quality pop up menu in
- // Job dialog.
- #define r_QualPopUpCtl 150 // Quality pop up menu control res. ID.
-
- #define r_QualPopUpMenu 160 // ID of the quality pop up menu.
- #define i_DraftItem 3 // The "Draft" item in the popup menu.
-
-
- //------------- style dialog ------------
-
- #define r_OptionsButton 21 // Button in Style dialog that invokes
- // the options dialog.
-
-
- //------------- options dialog ------------
-
-
- #define r_OptionsDialog 1918 // ID of the options DLOG/DITL.
-
- #define d_FlipPict 4 // DITL item of userItem (PICT) in both
- // options dialog, and format panel.
- #define d_LineItem 5 // DITL item of userItem (line).
- #define d_HFlip 6 // DITL item of "flip horizontal" checkbox.
- #define d_VFlip 7 // DITL item of "flip vertical" checkbox.
-
- //------------- options panel ------------
-
- #define d_pHFlip 2 // DITL item of "flip horizontal" checkbox.
- #define d_pVFlip 3 // DITL item of "flip vertical" checkbox.
-
- // IDs of PICTs drawn in the options dialog.
-
- #define p_Normal 128 // Normal (unflipped).
- #define p_HFlip 129 // Flipped horizontal.
- #define p_VFlip 130 // Flipped vertical.
- #define p_HVFlip 131 // Flipped horizontal and vertical.
-
-
- // status information
- #define kDriverStatus gxPrintingDriverBaseID // stat resource ID
- #define kSendingData 1 // item number for sending data
- #define kCheckOnline 2 // item number for printer offline
-
- // options, placed into the job collection
- #define kSuperRes 0x1 // highest res possible (160X144, 80X72)
-
-
- // do the following only if we aren't running in Rez
- #ifndef REZ
-
- #define kNoPackagingOptions 0
- #define kDoSmallLineFeeds 0x1
-
- typedef struct FlipCollection
- {
- char flipHorizontal;
- char flipVertical;
- } FlipCollection, *FlipCollectionPtr, **FlipCollectionHdl;
-
-
- // Struct to hold flipped picts when options dialog is up.
-
- typedef struct FourPicts {
- char curFlipping; // Current flip settings.
- PicHandle pict[4]; // PICTs representing the 4 different flip settings.
- } FourPicts;
-
-
- // our new API's global data structure
- typedef struct
- {
- long leftMargin; // margin at left edge of page
- long lineFeeds; // accumulated lines feeds
- long packagingOptions; // controls packaging and escape generation
- ResType commType; // type of communications
- Handle draftTable; // table for driving draft output, nil when not loaded
- Boolean isImageWriterII; // is this an ImageWriter II?
- } SpecGlobals, *SpecGlobalsPtr, **SpecGlobalsHdl;
-
-
- // Our global data structure for data we need to store and
- // retrieve from our Job & Style dialog's item/hit/initProcs.
- // Note: originalItemProc is used by both the style and the job
- // dialogs, but optionsDialog and flippedPicts are only used by
- // the style dialog.
-
- typedef struct DialogGlobals {
- Boolean inStyleDialog; // true = Style dialog, false = Job dialog.
- void *originalItemProc; // the dialog's original itemProc.
- DialogPtr optionsDialog; // pointer to our options dialog.
- FourPicts *flippedPicts; // pointer to our Style dialog's flip picts.
- } DialogGlobals, *DialogGlobalsPtr, **DialogGlobalsHdl;
-
-
- // Prototypes:
-
- extern OSErr StoreFmtCollectionItem(void *collectItem, long collectSize,
- OSType collectType, short collectID,
- gxFormat whichFormat);
-
- extern OSErr GetFmtCollectionItem(void *collectItem, long *collectSize,
- OSType collectType, short collectID,
- gxFormat whichFormat);
-
- extern char GetCurFlip(DialogPtr theDialog, short hFlipBox, short vFlipBox);
- extern void SetFormatFlipping(char flipSetting, gxFormat whichFormat);
- extern OSErr HandlePanelUpdate(DialogPtr theDialog, gxPanelInfoRecord *panelInfo);
- extern void SetFormatFlipping(char flipSetting, gxFormat whichFormat);
-
- #undef r_FlipPanel2
- #undef r_FlipPanelIcon2
-
- #define r_FlipPanel2 5000
- #define r_FlipPanelIcon2 5000
-
- #endif
-